CORS-4512: aws: allow privateDNSName and assignPrimaryIPv6 field on CAPI machines in dual-stack clusters#592
CORS-4512: aws: allow privateDNSName and assignPrimaryIPv6 field on CAPI machines in dual-stack clusters#592tthvo wants to merge 2 commits into
Conversation
|
Pipeline controller notification For optional jobs, comment This repository is configured in: LGTM mode |
|
@tthvo: This pull request explicitly references no jira issue. DetailsIn response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the openshift-eng/jira-lifecycle-plugin repository. |
WalkthroughRemoves the ChangesAWS Dual-Stack Field Support
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes 🚥 Pre-merge checks | ✅ 12 | ❌ 3❌ Failed checks (3 warnings)
✅ Passed checks (12 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: The full list of commands accepted by this bot can be found here. DetailsNeeds approval from an approver in each of these files:Approvers can indicate their approval by writing |
|
/hold |
|
/hold cancel |
|
/retitle: CORS-4512: aws: allow privateDnsName field on AWS CAPI machines for dualstack |
|
@tthvo: This pull request references CORS-4512 which is a valid jira issue. DetailsIn response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the openshift-eng/jira-lifecycle-plugin repository. |
…upport Remove privateDnsName from the unsupported AWS spec fields admission policy and CAPI-to-MAPI conversion validation. This unblocks dualstack installs that require configuring instance hostname DNS records (AAAA/A) via the CAPA PrivateDNSName field.
…yIPv6 Allow privateDNSName and assignPrimaryIPv6 fields during CAPI to MAPI conversion since the relevant information is available on the infrastructure CR. During MAPI to CAPI conversion, derive dual-stack specific fields from the infrastructure CR's IPFamily: - privateDNSName: set resource-name hostnames with A and AAAA records for both dual-stack modes - assignPrimaryIPv6: set to enabled for DualStackIPv6Primary and disabled for DualStackIPv4Primary Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@pkg/conversion/mapi2capi/aws.go`:
- Line 287: The convertAWSDualStackFieldsToCAPI helper function can panic when
m.infrastructure is nil because it dereferences status fields without
validation. Add a nil check for the infrastructure parameter at the beginning of
the convertAWSDualStackFieldsToCAPI function to return a validation error
instead of panicking when the parameter is nil. This will ensure the conversion
properly handles cases where infrastructure is not provided and returns
appropriate validation errors rather than crashing.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Repository YAML (base), Central YAML (inherited)
Review profile: CHILL
Plan: Enterprise
Run ID: ee8d3b1b-e0cf-4acf-997e-2d8cf3c34a5f
📒 Files selected for processing (7)
admission-policies/aws/unsupported-aws-spec-fields.yamlcapi-operator-manifests/aws/manifests.yamlpkg/controllers/machinesync/machine_sync_controller_test.gopkg/conversion/capi2mapi/aws.gopkg/conversion/capi2mapi/aws_test.gopkg/conversion/mapi2capi/aws.gopkg/conversion/mapi2capi/aws_test.go
💤 Files with no reviewable changes (4)
- pkg/conversion/capi2mapi/aws_test.go
- admission-policies/aws/unsupported-aws-spec-fields.yaml
- capi-operator-manifests/aws/manifests.yaml
- pkg/controllers/machinesync/machine_sync_controller_test.go
|
/test e2e-aws-capi-techpreview |
|
/test e2e-aws-capi-techpreview |
|
@tthvo: all tests passed! Full PR test history. Your PR dashboard. DetailsInstructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. I understand the commands that are listed here. |
Description
Remove
privateDnsNamefrom the unsupported AWS spec fields admission policy and CAPI-to-MAPI conversion validation. This unblocks dualstack installs that require configuring instance hostname DNS records (AAAA/A) via the CAPA PrivateDNSName field. Additionally,assignPrimaryIPv6is also handled the same way.Note: MAPI has no equivalent fields and the infra CR already holds these information via ipFamily, so it is silently dropped during conversion.
See also #593
Summary by CodeRabbit
privateDnsNamein AWS machine policy checks.proxyortlssettings are present.privateDnsNameandassignPrimaryIPv6based on the infrastructure IP family.